﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AMatysiak.Methods
{
    public static class NumberExtensions
    {
        public static double MoneyRound(this double d)
        {
            return Math.Round(d, 2, MidpointRounding.AwayFromZero);
        }

        public static string ToCurrency(this double d)
        {
            return d.ToString("C2");
        }

        public static string ToCurrency(this int i)
        {
            return i.ToString("C2");
        }
    }
}
